#pragma once
#include"Epoll.h"

class Epoll;
class Channel
{
public:
    Channel(Epoll*,int);

    void enableRead();
    int getFd();
    uint32_t getEvents();
    uint32_t getRevents();
    bool getInEpoll();
    void setInEpoll();
    void setRevents(uint32_t);

    ~Channel();

private:
    Epoll* _ep;
    int _fd;
    uint32_t events;
    uint32_t _revents;
    bool _inEpoll;
};